home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 3
/
Merciful_Release_3.bin
/
software
/
m
/
moneymattersv4.02.dms
/
in.adf
/
Install Money Matters
< prev
next >
Wrap
Text File
|
1996-01-10
|
39KB
|
1,638 lines
; $VER: Digita Money Matters 4.01 Installer Script 30/11/95
; English Language
;
; This section contains the Text strings for translation and
; appending to the code
;
; Copyright (C) Digita International
; By Mark Jackson
;------------------------------------------------------
; ### Variable declarations
(set #ProgName "Money Matters")
(set #NumberInstallDisks 1)
(set #InstallDisk "MoneyMattersInstall")
(set #NumNewDisks 2)
(set #DiskName "Money Matters")
(set #FilesName "MM-Files")
(set #RamTempFile "RAM:MMTemp")
(set #RamUtils "RAM:MMUtils")
(set #HDSpaceNeededBytes (* (* 1 1024) 1024)) ;1MB free
(set #NumFonts 3)
(set #Font1Name "DigitaSans.font")
(set #Font2Name "DigitaSansBold.font")
(set #Font3Name "NewTopaz.font")
(set #DriverDest "DEVS:Printers")
(set #ToolDest (cat #DiskName ":Money Matters"))
(set #HelpTool "HELPPATH")
;------------------------------------------------------
; ### String declaration
;// Drawer names
(set #DrawerName "Money Matters")
(set #SamplesName "Samples")
(set #FontsName "Fonts")
(set #LibsDefault "Libs")
;------------------------------------------------------
;// Archive Names
(set #ASLArchiveName "Asl.lha")
(set #AmigaGuideArchiveName "Amigaguide.lha")
(set #ProgArchiveName "MM.lha")
(set #HelpArchiveName "Help.lha")
(set #SamplesArchiveName "Samples.lha")
(set #FontsArchiveName "Fonts.lha")
(set #DevicesArchiveName "Devices.lha")
;------------------------------------------------------
;// File Names
(set #LibsSource (cat #InstallDisk ":libs"))
;------------------------------------------------------
;// Message strings
(set #BadKick
(cat #ProgName " requires Workbench 2.04 or above to work correctly.")
)
(set #CheckStartup
(cat "\n\n\nPlease wait...\n\nThe installer is just checking your system.")
)
(set #DestChoicePrompt
(cat "\n\n\nWhere would you like to install " #ProgName "?")
)
(set #FloppyChoiceMsg
(cat "On floppy disks")
)
(set #HardDiskChoiceMsg
(cat "On a hard disk")
)
(set #DestChoiceHelp
(cat "\nSelect the radio button \"On a hard disk\" to "
"install " #ProgName " onto your hard disk.\n\n"
"Select the radio button \"On floppy disks\" to "
"install " #ProgName " onto a set of backup disks.\n\n\n"
)
)
(set #HardDiskDestChoiceMsg
(cat "Where do you want to install the\n" #ProgName " drawer?")
)
(set #HardDiskDestChoiceHelp
(cat "Select the drawer where you want to install " #ProgName
", then click Proceed (a new drawer titled \"" #DrawerName
"\" will be created and will contain the " #ProgName " program.)"
)
)
(Set #HDBootedFromFloppy
(cat "It appears you are installing to Hard-disk, but booted from the " #InstallDisk
" Floppy-disk, this will not work.\n\nPlease reset your Amiga with no floppy-disks "
"inserted so it boots from the hard-disk, then try installing " #ProgName " again."
)
)
(set #NoDiskSpaceMsg1
(cat "\nThere is insufficient available space on your hard disk to install "
#ProgName ". You will need a minimum of "
)
)
(set #NoDiskSpaceMsg2
(cat "MB of free disk space.\n\nEither click \"Abort Install\" to exit this "
"installation and delete some files from your hard disk, or click \"Proceed\" and try a "
"different partition."
)
)
(set #DrawerExistsMsg
(cat "\nA drawer titled \"" #DrawerName "\" already exists in "
"the destination you have chosen.\n\nDo you wish to replace it "
"or choose a new destination?\n\n"
)
)
(set #DrawerExistsChoice1 "Replace it")
(set #DrawerExistsChoice2 "Choose new destination")
(set #DrawerExistsHelp
(cat "\nYou have chosen a destination drawer which already has \""
#DrawerName "\" installed there.\n\nClick \""
#DrawerExistsChoice1 "\" to replace the contents with this new version "
"of " #ProgName ".\nClick \"" #DrawerExistsChoice2 "\" to choose a "
"new destination drawer.\n\n"
"If you choose \"" #DrawerExistsChoice1 "\" then please make sure you "
"have back up copies of any documents you wish to keep."
)
)
(set #InstallChoice1 "Yes - Replace it")
(set #InstallChoice2 "No")
(set #OldASLLibraryMsg
(cat "You either do not have an ASL.library, or it is the wrong version. "
#ProgName " requires you have at least version 38 of this "
"library. Do you want to copy version 38 of the ASL.library?"
)
)
(set #OldASLLibraryHelp
(cat #ProgName " will not work properly unless you have at least version 38 "
"of the ASL.library (Workbench 2.1 or above).\n\n"
"Choose \"" #InstallChoice1 "\" to copy version 38 of the library "
"and then install " #ProgName ".\nChoose \"" #InstallChoice2 "\" to not install "
"ASL.library version 38."
)
)
(set #OldDiskFontLibraryMsg
(cat "You either do not have an DiskFont.library, or it is the wrong version. "
#ProgName " requires you have at least version 36 of this "
"library. Do you want to copy version 36 of the DiskFont.library?"
)
)
(set #OldDiskFontLibraryHelp
(cat #ProgName " will not work properly unless you have at least version 36 "
"of the DiskFont.library (Workbench 2 or above).\n\n"
"Choose \"" #InstallChoice1 "\" to copy version 36 of the library "
"and then install " #ProgName ".\nChoose \"" #InstallChoice2 "\" to not install "
"DiskFont.library version 36 and quit this installer."
)
)
(set #OldAmigaGuideLibraryMsg
(cat "You either do not have an AmigaGuide.library, or it is the wrong version. "
#ProgName " requires you have at least version 34.11 of this "
"library. Do you want to copy version 34.11 of the AmigaGuide.library?"
)
)
(set #OldAmigaGuideLibraryHelp
(cat #ProgName " will not work properly unless you have at least version 34.11 "
"of the AmigaGuide.library.\n\n"
"Choose \"" #InstallChoice1 "\" to copy version 34.11 of the library "
"and then install " #ProgName ".\nChoose \"" #InstallChoice2 "\" to not install "
"AmigaGuide.library version 34.11."
)
)
(set #OldLocaleLibraryMsg
(cat "You either do not have an Locale.library, or it is the wrong version. "
#ProgName " requires you have at least version 38 of this "
"library. Do you want to copy version 38 of the Locale.library?"
)
)
(set #OldLocaleLibraryHelp
(cat #ProgName " will not work properly unless you have at least version 38 "
"of the Locale.library (Workbench 2.1 or above).\n\n"
"Choose \"" #InstallChoice1 "\" to copy version 38 of the library "
"and then install " #ProgName ".\nChoose \"" #InstallChoice2 "\" to not install "
"Locale.library version 38."
)
)
(set #OldParseLibraryMsg
(cat "You either do not have an IffParse.library, or it is the wrong version. "
#ProgName " requires you have at least version 34 of this "
"library. Do you want to copy version 34 of the IffParse.library?"
)
)
(set #OldParseLibraryHelp
(cat #ProgName " will not work properly unless you have at least version 34 "
"of the IffParse.library (Workbench 1.3 or above).\n\n"
"Choose \"" #InstallChoice1 "\" to copy version 34 of the library "
"and then install " #ProgName ".\nChoose \"" #InstallChoice2 "\" to not install "
"IffParse.library version 34."
)
)
(set #InsertDiskMsg
(cat "\nPlease insert the disk labelled\n\n")
)
(set #diskhelp
(cat "\nIf you know that the correct disk is in the drive, but you still cannot proceed, "
"then the name of the disk is incorrect.\n"
"Ensure that the disk name is not preceded by 'copy_of_', or blank spaces before or after the disk name.\n\n\n" @askdisk-help
)
)
(set #Unpackmsg1 "Unarchiving ")
(set #Unpackmsg2 " to ")
(set #Unpackmsg3 "\n\nPlease wait...")
(set #ArchiveAbortMsg1
(cat "There was a problem when trying to dearchive '")
)
(set #ArchiveAbortMsg2
(cat "'. Please try installing to a different drawer or partition, "
"or contact Digita Technical Support."
)
)
(set #BlankDiskWarning
(cat "\nPlease insert a 'blank' disk in the internal\n"
"disk drive and click \"Proceed\" when ready."
"\n\nWARNING: This procedure will destroy all information "
"that may already be on the disk."
)
)
(set #FloppyWarningHelp
(cat "\nThis procedure uses the 'format' command to "
"wipe and prepare the disk in the internal disk drive "
"for use with Datastore."
"\n\nWrite-protect your master disks before making "
"backup copies and place the masters in a safe place."
"\n\nYou should also write-protect your backup disks "
"before clicking the \"Proceed\" button."
)
)
(set #NotBlankMsg1
(cat "\nYou have the \"")
)
(set #NotBlankMsg2
(cat "\" disk in your internal disk drive.\n\nPlease "
"replace this disk with a blank one, before "
"clicking the \"Proceed\" button."
)
)
(set #FormatWorkingMsg
(cat "Please wait... Formatting a disk.")
)
(set #FormatError
(cat "\nAn error occured when trying to format this disk.\n\n"
"Please ensure that the disk is in the disk drive "
"before you click the \"Proceed\" button or "
"put another disk in the drive and try again."
)
)
(set #FormatErrorHelp
(cat "\nAn error has occured during the formatting of "
"your disk. This could be for many reasons, but more "
"commonly, either the disk was corrupt or the drive was "
"faulty.\nPlease try a different disk, check the drive "
"and then if the problem persists, contact the Technical "
"Support Department. Information on how to get Support is "
"explained in the manual."
)
)
(set #FormatCompleteMsg1
(cat " created.\n\nPlease take out the disk "
"in the internal disk drive and label it \""
)
)
(set #FormatCompleteMsg2
(cat "\", then click the \"Proceed\" button.")
)
(set #FormatChoiceprompt
(cat "\n" #ProgName " needs to format and name two disks during installation. "
"For more information click 'Help'. Do you wish to:"
))
(set #FormatChoicemsg1 "Slow Format Some Blank Disks")
(set #FormatChoicemsg2 "Quick Format Some Blank Disks")
(set #FormatChoice-Help
(cat "This installation utility needs to prepare two disks before installing "
#ProgName ". Before each disk is created, it will be formatted and named. "
"\n\nChoose '" #FormatChoicemsg1 "' if you wish to perform a full format, or \nchoose "
"'" #FormatChoicemsg2 "' to perform a quick format on disks that must have been "
"previously formatted as Fast File System disks."
))
(set #FloppyFinishedMsg
(cat "\nAfter clicking the 'Proceed' button, place the \"" #DiskName
"\" disk in the internal disk drive and reset your Amiga.\n"
)
)
(set #WorkingMsg (cat "Please wait...\n\nInstalling " #ProgName))
(set #CreateDiskPrompt1 "\n\nDo you want to create the '")
(set #CreateDiskPrompt2 "' disk?")
(set #ChoiceContinue "Yes")
(set #ChoiceSkip "Skip this part")
(set #CreateMainDiskHelp
(cat "\nThe '" #DiskName "' disk contains all the "
#ProgName " program files. \n\nIf you would like to create a "
#DiskName " disk then click '" #ChoiceContinue "'.\nIf you do "
"not want to create this disk then click '" #ChoiceSkip "'."
)
)
(set #CreateFilesDiskHelp
(cat "\nThe '" #FilesName "' disk contains the Help file and"
" sample " #ProgName " files. \n\nIf you would like to create a "
#FilesName " disk then click '" #ChoiceContinue "'.\nIf you do "
"not want to create this disk then click '" #ChoiceSkip "'."
)
)
(set #PrinterChoicePrompt
(cat "\n\nDo you wish to install a printer driver?"
)
)
(set #PrinterChoicemsg1 "Yes")
(set #PrinterChoicemsg2 "No")
(set #PrinterChoice-Help
(cat "To print from " #ProgName " you need to have the correct printer driver selected for your "
"printer.\nClick the '" #PrinterChoicemsg1 "' button if you wish to install a printer "
"driver, or the '" #PrinterChoicemsg2 "' button if you do not want to install a printer "
"driver."
)
)
(set #AskLocaleCmd "Assign >NIL: LOCALE: RAM:")
(set #AskLocaleMsg
(cat "For " #ProgName " to work properly, an assign has to be added "
"to your 'user-startup' script:\n\n'" #AskLocaleCmd "'\n\nClick "
"Proceed to continue."
)
)
(set #AskLocaleHelp
(cat "For the Date and Time functions to work properly, an assign "
"for LOCALE needs to be added to your startup scripts.\n\nClick "
"Proceed if you want the installer to do this automatically, or "
"click 'Skip This Part' to not modify the user-startup."
)
)
;------------------------------------------------------
; ### Procedure declarations
;------------------------------------------------------
;// routine to get disk specified in '#FileSourceDisk'
(procedure @GetDisk
(
(askdisk
(prompt #InsertDiskMsg #FileSourceDisk)
(help #diskhelp)
(dest #FileSourceDisk)
)
)
)
;------------------------------------------------------
;// Procedure to decompress file set in '#UnpackFile' to '#UnpackDest'
(procedure @UnpackFiles
(
(working #Unpackmsg1 #UnpackFile #Unpackmsg2 #UnpackDest #Unpackmsg3)
(set ExpandName #UnpackFile)
(set #ArchiveError 0)
(set RunLhx
(cat "MMUtils:Lhx -I -m e \"" ExpandName "\" \"" #UnpackDest "\"")
)
(set #ArchiveError (run RunLhx))
(if (> #ArchiveError 0)
(cat
(set #ArchiveAbortMsg (cat #ArchiveAbortMsg1 ExpandName #ArchiveAbortMsg2))
(abort #ArchiveAbortMsg)
)
)
)
)
;------------------------------------------------------
;// Initial Checks
(procedure @InitialChecks
(
;// Check OS version
(working #CheckStartup)
(set #OSVerNum (getversion))
(set #OSVersion (/ #OSVerNum 65536))
(if (< #OSVersion 37)
(abort #BadKick)
)
;// Create temp file in ram: for files
(if (not (exists #RamTempFile))
(
(makedir #RamTempFile (safe))
)
)
(makeassign "MMTemp" #RamTempFile (safe))
;// Create temp file in ram: for utils
(if (not (exists #RamUtils))
(
(makedir #RamUtils (safe))
)
)
(makeassign "MMUtils" #RamUtils (safe))
;// Set flag if novice user
(set #UserNovice 0)
(if (= @user-level 0)
(
(set #UserNovice 1)
)
)
(copyfiles
(source (cat #InstallDisk ":Utils"))
(dest "MMUtils:")
(all)
(nogauge)
(optional "nofail")
)
;// don't copy delete to MMUtils, as it is used to delete MMUtils!
(copyfiles
(source (cat #InstallDisk ":C"))
(dest "Ram:")
(pattern "delete")
(nogauge)
(optional "nofail")
)
(copyfiles
(source (cat #InstallDisk ":C"))
(dest "Ram:")
(pattern "assign")
(nogauge)
(optional "nofail")
)
(copyfiles
(source (cat #InstallDisk ":System"))
(dest "MMUtils:")
(pattern "format")
(nogauge)
(optional "nofail")
)
)
)
;------------------------------------------------------
;// Check that ASL library if from WB 2.1 (if not replace)
(procedure @CheckASL
(
(set ASLVerNum (getversion (cat #LibsDefault ":ASL.library")))
(set ASLVer (/ ASLVerNum 65536))
(if (< ASLVer 38)
(
(if (= @user-level 2)
(
(set InstallASLLibrary
(askbool
(prompt #OldASLLibraryMsg)
(choices #InstallChoice1 #InstallChoice2)
(help #OldASLLibraryHelp)
(default 1)
)
)
(if (= InstallASLLibrary 1)
(
(@InstallASL)
)
)
)
(
(@InstallASL)
)
)
)
) ;endif
)
)
;------------------------------------------------------
;// Procedure to install the asl library
(procedure @InstallASL
(
(set #UnpackFile (cat #ArchiveLocation #ASLArchiveName))
(set #UnpackDest #LibsDest)
(if (exists (cat #UnpackDest "asl.library"))
(delete (cat #UnpackDest "asl.library")
(optional "force")
)
)
(@UnpackFiles)
)
)
;------------------------------------------------------
;// Check that Locale library is from WB 2.1 (if not replace)
(procedure @CheckLocale
(
(set LocaleVerNum (getversion (cat #LibsDefault ":Locale.library")))
(set LocaleVer (/ LocaleVerNum 65536))
(if (< LocaleVer 38)
(
(if (= @user-level 2)
(
(set InstallLocaleLibrary
(askbool
(prompt #OldLocaleLibraryMsg)
(choices #InstallChoice1 #InstallChoice2)
(help #OldLocaleLibraryHelp)
(default 1)
)
)
(if (= InstallLocaleLibrary 1)
(
(@InstallLocale)
)
)
)
(
(@InstallLocale)
)
)
)
) ;endif
)
)
;------------------------------------------------------
;// Procedure to install the locale library
(procedure @InstallLocale
(
(if (exists (cat #LibsDefault ":locale.library"))
(
(delete (cat #LibsDefault ":locale.library")
(optional "force")
)
)
)
(copyfiles
(source #LibsSource)
(dest (cat #LibsDefault ":"))
(pattern "locale.library")
(optional "force")
)
)
)
;------------------------------------------------------
;// Check that IFFParse library if from WB 1.3 (if not replace)
(procedure @CheckParse
(
(set ParseVerNum (getversion (cat #LibsDefault ":iffparse.library")))
(set ParseVer (/ ParseVerNum 65536))
(if (< ParseVer 34)
(
(if (= @user-level 2)
(
(set InstallParseLibrary
(askbool
(prompt #OldParseLibraryMsg)
(choices #InstallChoice1 #InstallChoice2)
(help #OldParseLibraryHelp)
(default 1)
)
)
(if (= InstallParseLibrary 1)
(
(@InstallParse)
)
)
)
(
(@InstallParse)
)
)
)
) ;endif
)
)
;------------------------------------------------------
;// Procedure to install the iffparse library
(procedure @InstallParse
(
(if (exists (cat #LibsDefault ":iffparse.library"))
(
(delete (cat #LibsDefault ":iffparse.library")
(optional "force")
)
)
)
(copyfiles
(source #LibsSource)
(dest (cat #LibsDefault ":"))
(pattern "iffparse.library")
(optional "force")
)
)
)
;------------------------------------------------------
;// Check that diskfont library is at least WB 2 (if not replace)
(procedure @CheckDiskFont
(
(set DFVerNum (getversion (cat #LibsDefault ":diskfont.library")))
(set DFVer (/ DFVerNum 65536))
(if (< DFVer 36)
(
(if (= @user-level 2)
(
(set InstallDiskFontLibrary
(askbool
(prompt #OldDiskFontLibraryMsg)
(choices #InstallChoice1 #InstallChoice2)
(help #OldDiskFontLibraryHelp)
(default 1)
)
)
(if (= InstallDiskFontLibrary 1)
(
(@InstallDiskFont)
)
) ;end if
)
(
(@InstallDiskFont)
)
) ;end if
)
) ;endif
)
)
;------------------------------------------------------
;// Procedure to install the diskfont library
(procedure @InstallDiskFont
(
(if (exists (cat #LibsDefault "diskfont.library"))
(delete (cat #LibsDefault "diskfont.library")
(optional "force")
)
)
(copyfiles
(source #LibsSource)
(dest (cat #LibsDefault ":"))
(pattern "diskfont.library")
(optional "force")
)
)
)
;------------------------------------------------------
;** Check that AmigaGuide library is at least version 34.11 (if not replace)
(procedure @CheckAmigaGuide
(
(set AGVerNum (getversion (cat #LibsDefault ":amigaguide.library")))
(set AGVer (/ AGVerNum 65536))
(set AGRev (- AGVerNum (* AGVer 65536)))
(if (< AGVer 35)
(
(if (< AGRev 11)
(
(if (= @user-level 2)
(
(set InstallAmigaGuideLibrary
(askbool
(prompt #OldAmigaGuideLibraryMsg)
(choices #InstallChoice1 #InstallChoice2)
(help #OldAmigaGuideLibraryHelp)
(default 1)
)
)
(if (= InstallAmigaGuideLibrary 1)
(
(@InstallAmigaGuide)
)
);end if
)
(
(@InstallAmigaGuide)
)
) ;end if (user-level)
)
) ;end if (revision)
)
) ;end if (version)
)
)
;------------------------------------------------------
;// Procedure to install amigaguide library
(procedure @InstallAmigaGuide
(
(set #UnpackFile (cat #ArchiveLocation #AmigaGuideArchiveName))
(set #UnpackDest #LibsDest)
(if (exists (cat #UnpackDest "amigaguide.library"))
(delete (cat #UnpackDest "amigaguide.library")
(optional "force")
)
)
(@UnpackFiles)
)
)
;------------------------------------------------------
;// Procedure to unprotect screen fonts if already present
(procedure @UnProtectFonts
(
(set #Counter 0)
(while (< #Counter #NumFonts)
(
(set #FontName
(select #Counter
#Font1Name
#Font2Name
#Font3Name
)
)
(set #CheckFont (tackon #FontsDest #FontName))
(if (exists #CheckFont)
(
(protect #CheckFont "+r+w+e+d")
)
)
(set #Counter (+ #Counter 1))
)
)
)
)
;------------------------------------------------------
;// Procedure to de-archive screen fonts
(procedure @DearchiveScreenFonts
(
(set #UnpackFile (cat #ArchiveLocation #FontsArchiveName))
(set #UnpackDest #FontsDest)
(@UnpackFiles)
)
)
;------------------------------------------------------
;// Install to HD or Floppy ?
(procedure @CheckHDorFloppy
(
;// Floppy or HD ?
(set #FullPath (expandpath "sys:"))
(if (= #FullPath (cat #InstallDisk ":"))
(set #DiskDefault 1)
(set #DiskDefault 0)
)
;** set novice user to expert briefly
(set #UserNovice 0)
(if (= @user-level 0)
(
(user 2)
(set #UserNovice 1)
)
)
(set #DestinationType
(askchoice
(prompt #DestChoicePrompt)
(choices #HardDiskChoiceMsg
#FloppyChoiceMsg
)
(help #DestChoiceHelp)
(default #DiskDefault)
)
)
;** set novice user back to novice
(if (= #UserNovice 1)
(user 0)
)
(if (= #DestinationType 0)
(set #DestinationType "Hard")
(set #DestinationType "Floppy")
)
)
)
;------------------------------------------------------
;// Choose hard disk destination for Money Matters drawer
(procedure @ChooseHDDest
(
;** Find default drawer
(set #DefaultDest (getassign "Work" "d"))
(if (= #DefaultDest "")
(
(set #DefaultDest (getassign "HD3" "d"))
(if (= #DefaultDest "")
(
(set #DefaultDest (getassign "HD2" "d"))
(if (= #DefaultDest "")
(
(set #DefaultDest (getassign "HD1" "d"))
(if (= #DefaultDest "")
(
(set #DefaultDest (getassign "DH1" "d"))
(if (= #DefaultDest "")
(
(set #DefaultDest (getassign "HD0" "d"))
(if (= #DefaultDest "")
(
(set #DefaultDest "DH0:")
(if (= #UserNovice 1)
(user 2)
)
)
)
)
)
)
)
)
)
)
)
)
)
;** Ask for destination
(set #DestDrawer
(askdir
(prompt #HardDiskDestChoiceMsg)
(help #HardDiskDestChoiceHelp)
(default #DefaultDest)
)
)
(if (= #UserNovice 1)
(user 0)
)
)
)
;------------------------------------------------------
;// Find HD Destination and check enough space
(procedure @FindHDDest
(
(set MMExists 0)
(while (= MMExists 0)
(
(@ChooseHDDest)
(while (< (getdiskspace #DestDrawer) #HDSpaceNeededBytes)
(
(if (< (getdiskspace #DestDrawer) #HDSpaceNeededBytes)
(
(if (= @user-level 0)
(
(user 2)
(set #UserNovice 1)
)
)
(message #NoDiskSpaceMsg1 (/ (/ #HDSpaceNeededBytes 1024) 1024) #NoDiskSpaceMsg2)
(@ChooseHDDest)
)
)
)
) ;end while
(@CheckExistsAlready)
)
);end while
(if (= #UserNovice 1)
(user 0)
)
)
)
;------------------------------------------------------
;// Procedure to check if Money Matters exists already in destination
;// Replace or choose again if so
(procedure @CheckExistsAlready
(
(if (exists (tackon #DestDrawer #DrawerName))
(
(set ChooseAgainAnswer
(askbool
(prompt #DrawerExistsMsg)
(choices #DrawerExistsChoice1 #DrawerExistsChoice2)
(help #DrawerExistsHelp)
(default 1)
)
)
(if (= ChooseAgainAnswer 0)
(
(set MMExists 0)
)
(
(set MMExists 1)
)
)
)
(;else
(set MMExists 1)
)
);endif
)
)
;------------------------------------------------------
;// Create Money Matters drawers in chosen destination
(procedure @CreateDrawers
(
(working #WorkingMsg)
(set #InsideHDDest (tackon #DestDrawer #DrawerName))
;// Make the main Money Matters drawer
(makedir #InsideHDDest (infos))
;// Make the Samples drawer
(set #HDSamplesDest (tackon #InsideHDDest #SamplesName))
(makedir #HDSamplesDest (infos))
)
)
;------------------------------------------------------
;// set up hard drive destinations
(procedure @SetUpHDProgDests
(
(working #WorkingMsg)
(set #ProgDest (cat #InsideHDDest "/"))
(set #HelpDest (cat #InsideHDDest "/"))
(set #ProgIcon (cat #ProgDest #ProgName))
(set #SamplesDest (cat #HDSamplesDest "/"))
(set #FontsDest "FONTS:")
(set #LibsDest "LIBS:")
)
)
;------------------------------------------------------
;// set up floppy disk destinations
(procedure @SetUpFloppyProgDests
(
(set #ProgDest (cat #DiskName ":"))
(set #HelpDest (cat #FilesName ":"))
(set #SamplesDest (cat #FilesName ":" #SamplesName "/"))
(set #FontsDest (cat #DiskName ":" #FontsName "/"))
(set #LibsDest (cat #DiskName ":Libs/"))
)
)
;------------------------------------------------------
;// Check to make sure that none of the Money Matters disks
;// are in the internal drive before creating blank ones.
(procedure @CheckDisks
(
(set #NumberDisks (+ #NumberInstallDisks #NumNewDisks))
(set #DiskBlank 1)
(set n 0)
(until (OR (= n #NumberDisks) (= #DiskBlank 0))
(
(set #CheckMainDisk
(select n
#InstallDisk
#DiskName
#FilesName
)
)
(if (= (getassign "df0" "d") (cat #CheckMainDisk ":"))
( ;disk is not blank
(set #DiskBlank 0)
)
)
(set n (+ n 1))
)
)
)
)
;------------------------------------------------------
;// Format and name the disk given in #FormatMainDisk
(procedure @FormatDisk
(
(working #FormatWorkingMsg)
(set #FormatMainDisk (cat "\"" #FormatMainDisk "\""))
;*** USE 2.0 FORMAT COMMAND ***
(if (= #FormatChoice 0)
(
(set #FormatCheck
(run ("MMUtils:Format drive=df0: name=%s FFS NOICONS" #FormatMainDisk))
)
)
(
(set #FormatCheck
(run ("MMUtils:Format drive=df0: name=%s FFS QUICK NOICONS" #FormatMainDisk))
)
)
)
(if (OR (> #FormatCheck 0) (< #FormatCheck 0))
(set #NoError 1)
(set #NoError 0)
)
)
)
;------------------------------------------------------
;// routine to check disk in drive ok and format it if so
(procedure @Makedisk
(
(set #NoError 1)
(while (= #NoError 1)
(
;** Make sure that the install disks are not in the drive
(run "MMUtils:Wait 5") ;Wait a bit for disk access to stop
(@CheckDisks)
(if (= #DiskBlank 0)
(
(message #NotBlankMsg1 #CheckMainDisk #NotBlankMsg2)
)
(
(set #NoError 1)
(@FormatDisk)
(if (= #NoError 1)
(
(message #FormatError (help #FormatErrorHelp))
)
)
)
)
)
)
)
)
;------------------------------------------------------
;// Create floppy disk 1
(procedure @CreateDisk1
(
;// Copy system files from install disk to Ram...
(copyfiles
(source (cat #InstallDisk ":Libs"))
(dest "RAM:Libs")
(all)
(optional "force")
)
(copyfiles
(source (cat #InstallDisk ":c"))
(dest "RAM:c")
(all)
(optional "force")
)
(copyfiles
(source (cat #InstallDisk ":l"))
(dest "RAM:l")
(all)
(optional "force")
)
(copyfiles
(source (cat #InstallDisk ":Devs"))
(dest "RAM:Devs")
(all)
(optional "force")
)
(copyfiles
(source (cat #InstallDisk ":prefs"))
(dest "RAM:prefs")
(all)
(optional "force")
)
(copyfiles
(source (cat #InstallName ":Locale"))
(dest "RAM:Locale")
(all)
(optional "force")
)
(copyfiles
(source (cat #InstallName ":S"))
(dest "RAM:S")
(all)
(optional "force")
)
;// Now create the first disk
(message #BlankDiskWarning
(help #FloppyWarningHelp)
)
(set #FormatMainDisk #DiskName)
(@Makedisk)
(run "MMUtils:Install2.1 df0:")
;// Now copy all files from RAM to disk 1, then delete them.
(set #FileSourceDisk #DiskName)
(@GetDisk)
(copyfiles
(source "RAM:Libs")
(dest (cat #DiskName ":Libs"))
(all)
(optional "force")
)
(run "ram:delete RAM:Libs all" (safe))
(copyfiles
(source "RAM:l")
(dest (cat #DiskName ":L"))
(all)
(optional "force")
)
(run "ram:delete RAM:l all" (safe))
(complete 20)
(copyfiles
(source "RAM:c")
(dest (cat #DiskName ":C"))
(all)
(optional "force")
)
(run "ram:delete RAM:c all" (safe))
(copyfiles
(source "RAM:Devs")
(dest (cat #DiskName ":Devs"))
(all)
(optional "force")
)
(run "ram:delete RAM:Devs all" (safe))
(copyfiles
(source "RAM:prefs")
(dest (cat #DiskName ":Prefs"))
(all)
(optional "force")
)
(run "ram:delete RAM:prefs all" (safe))
(copyfiles
(source "RAM:Locale")
(dest (cat #DiskName ":Locale"))
(all)
(optional "force")
)
(run "ram:delete RAM:Locale all" (safe))
(copyfiles
(source "RAM:S")
(dest (cat #DiskName ":S"))
(all)
(optional "force")
)
(run "ram:delete RAM:S all" (safe))
;## Now install other devices
;## DISK SWAP to get rest of archives
(set #FileSourceDisk #InstallDisk)
(@GetDisk)
;// ... some archives...
(copyfiles
(source (cat #InstallDisk ":Archive"))
(dest "MMTemp:")
(pattern ("(MM.lha|Devices.lha|Fonts.lha|Asl.lha|Amigaguide.lha)"))
(optional "force")
(safe)
)
;## DISK SWAP back again to dearchive to disk
(set #FileSourceDisk #DiskName)
(@GetDisk)
(set #UnpackFile (cat #ArchiveLocation #DevicesArchiveName))
(set #UnpackDest (cat #DiskName ":Devs/"))
(@UnpackFiles)
(run (cat "ram:delete " #ArchiveLocation #DevicesArchiveName) (safe))
(complete 30)
(@DearchiveScreenFonts)
(run (cat "ram:delete " #ArchiveLocation #FontsArchiveName) (safe))
(@InstallASL)
(run (cat "ram:delete " #ArchiveLocation #ASLArchiveName) (safe))
(@InstallAmigaGuide)
(run (cat "ram:delete " #ArchiveLocation #AmigaGuideArchiveName) (safe))
(complete 40)
(@InstallProg)
(run (cat "ram:delete " #ArchiveLocation #ProgArchiveName) (safe))
(complete 50)
(tooltype
(dest "Money Matters:Money Matters")
(settooltype #HelpTool (cat #FilesName ":"))
)
(complete 60)
)
)
;------------------------------------------------------
;// Create floppy disk 2
(procedure @CreateDisk2
(
(set #FileSourceDisk #InstallDisk)
(@GetDisk)
(copyfiles
(source (cat #InstallDisk ":Archive"))
(dest "MMTemp:")
(pattern ("(Samples.lha|Help.lha)"))
(optional "force")
(safe)
)
;// Now create the second disk
(message #BlankDiskWarning
(help #FloppyWarningHelp)
)
(set #FormatMainDisk #FilesName)
(@Makedisk)
(complete 70)
;// Create the drawers with icons.
(makedir (cat #FilesName ":" #SamplesName) (infos))
;// Now copy all files from RAM to disk 2, then delete them.
(set #FileSourceDisk #FilesName)
(@GetDisk)
(@InstallSamples)
(run (cat "ram:delete " #ArchiveLocation #SamplesArchiveName) (safe))
(complete 80)
(@InstallHelp)
(run (cat "ram:delete " #ArchiveLocation #HelpArchiveName) (safe))
)
)
;------------------------------------------------------
;// Install program files
(procedure @InstallProg
(
(working #WorkingMsg)
(set #UnpackFile (cat #ArchiveLocation #ProgArchiveName))
(set #UnpackDest #ProgDest)
(@UnpackFiles)
)
)
;------------------------------------------------------
;// Install help files
(procedure @InstallHelp
(
(working #WorkingMsg)
(set #UnpackFile (cat #ArchiveLocation #HelpArchiveName))
(set #UnpackDest #HelpDest)
(@UnpackFiles)
)
)
;------------------------------------------------------
;// Install samples
(procedure @InstallSamples
(
(working #WorkingMsg)
(set #UnpackFile (cat #ArchiveLocation #SamplesArchiveName))
(set #UnpackDest #SamplesDest)
(@UnpackFiles)
)
)
;------------------------------------------------------
;// Install pictures
(procedure @InstallPictures
(
(working #WorkingMsg)
(set #UnpackFile (cat #ArchiveLocation #PicsArchiveName))
(set #UnpackDest #PicsDest)
(@UnpackFiles)
)
)
;------------------------------------------------------
;// Routine to install printer and fonts
(procedure @AddNewPrinter
(
(set #FileSourceDisk #InstallDisk)
(@GetDisk)
;// Delete all in MMTemp: first...
(run (cat "ram:delete MMTemp:#?" ) (safe))
(set #ChosenDriver "Generic")
(set #DriverSource (cat #InstallDisk ":Drivers"))
(if (= #DestinationType "Floppy")
(
(set #DriverDest (cat #DiskName ":Devs/Printers"))
)
(
(set #DriverDest "DEVS:Printers")
(set #CheckGeneric (cat #DriverDest "/" #ChosenDriver))
(if (exists #CheckGeneric)
(
(protect #CheckGeneric "+r+w+e+d")
)
)
)
)
;// Select printer (or driver) from list...
(working #WorkingMsg)
(set #SelectPrt
(cat "MMUtils:select MMUtils:MMPrinterList")
)
(run #SelectPrt (safe))
(set #ChosenDriver (getenv "wwDriver"))
(working #WorkingMsg)
;// driver chosen so copy it to ram...
(copyfiles
(source #DriverSource)
(dest #RamTempFile)
(pattern #ChosenDriver)
(optional "force")
(nogauge)
)
;// Now decompress Driver 'ChosenDriver' to destination '#RamTempFile'...
(set #UnpackFile (tackon #RamTempFile #ChosenDriver))
(set #UnpackDest "MMTemp:")
(@UnpackFiles)
(delete #UnpackFile)
;// get full uncompressed driver name...
(run "c:List " #RamTempFile " LFORMAT %s >ENV:wwDriver")
(set Driver (getenv "wwDriver"))
(set DriverLen (strlen Driver))
(set DriverLen (- DriverLen 1))
(set #ChosenDriver
(substr Driver 0 DriverLen)
)
;// finally, copy driver to driver destination...
(if (= #DestinationType "Floppy")
(
(set #FileSourceDisk #DiskName)
(@GetDisk)
)
)
(copyfiles
(source #RamTempFile)
(dest #DriverDest)
(pattern #ChosenDriver)
(optional "force")
)
)
)
;------------------------------------------------------
;// Delete any files from Ram and temporary Ram Drawer
(procedure @CleanUp
(
(working #WorkingMsg)
(makeassign "MMTemp" (safe))
(if (exists #RamTempFile)
(
(set DeleteDrawer (cat "ram:delete " #RamTempFile " all force"))
(Run DeleteDrawer)
)
)
(makeassign "MMUtils" (safe))
(if (exists #RamUtils)
(
(set DeleteDrawer (cat "ram:delete " #RamUtils " all force"))
(Run DeleteDrawer)
)
)
(delete "Ram:delete"
(optional "force")
)
)
)
;------------------------------------------------------
; ### Main
(complete 0)
(welcome)
(complete 5)
(@InitialChecks) ;// Copies relevent files to ram as well
(@CheckHDorFloppy)
(complete 10)
(if (= #DestinationType "Hard")
(
;// HD
; Install to Hard-disk
(if (= #FullPath (cat #InstallDisk ":"))
(Abort #HDBootedFromFloppy)
)
(set #ArchiveLocation (cat #InstallDisk ":Archive/"))
(set #FileSourceDisk #InstallDisk)
(@GetDisk)
(@SetUpHDProgDests)
(@CheckASL)
(@CheckLocale)
(@CheckParse)
(@CheckDiskFont)
(@CheckAmigaGuide)
;## if WB2.0 and on Hard disk
(if (= #OSVersion 37)
(if (= (getassign "LOCALE") "")
(
;no assign, so assign Locale to RAM:
(startup #ProgName
(prompt #AskLocaleMsg)
(help #AskLocaleHelp)
(command #AskLocaleCmd)
)
(run "Ram:Assign >NIL: LOCALE: RAM:")
)
)
)
(@FindHDDest)
(complete 20)
(@CreateDrawers)
(@SetUpHDProgDests)
(set @default-dest #DestDrawer)
(@UnProtectFonts)
(complete 30)
(@DearchiveScreenFonts)
(complete 40)
(@InstallProg)
(tooltype
(dest #ProgIcon)
(settooltype #HelpTool #HelpDest)
)
(complete 50)
(@InstallHelp)
(complete 60)
(@InstallSamples)
(complete 70)
; Set default tool type for all Sample files
(foreach #SamplesDest "#?"
(
(tooltype
(dest (cat #SamplesDest @each-name))
(setdefaulttool (cat #ProgDest #ProgName))
)
)
)
(complete 80)
)
(
;// Floppy
(set #ArchiveLocation "MMTemp:")
(@SetUpFloppyProgDests)
(if (>= @user-level 2) ;expert only
(
(set #FormatChoice
(askchoice
(prompt #FormatChoiceprompt)
(choices #FormatChoicemsg1 #FormatChoicemsg2)
(help #FormatChoice-help)
(default 0)
)
)
)
)
;// if expert then check user wants to create disk 1
(if (>= @user-level 2)
(
(set #CreateDiskChoice
(askbool
(prompt (cat #CreateDiskPrompt1 #DiskName #CreateDiskPrompt2))
(choices #ChoiceContinue #ChoiceSkip)
(help #CreateMainDiskHelp)
(default 1)
)
)
)
(set #CreateDiskChoice 1)
)
(if (= @user-level 0)
(
(user 2)
(set #UserNovice 1)
)
)
(if (= #CreateDiskChoice 1)
(@CreateDisk1)
)
(if (= #UserNovice 1)
(
(user 0)
)
)
;// if expert then check user wants to create disk 2
(if (>= @user-level 2)
(
(set #CreateDiskChoice
(askbool
(prompt (cat #CreateDiskPrompt1 #FilesName #CreateDiskPrompt2))
(choices #ChoiceContinue #ChoiceSkip)
(help #CreateFilesDiskHelp)
(default 1)
)
)
)
(set #CreateDiskChoice 1)
)
(if (= @user-level 0)
(
(user 2)
(set #UserNovice 1)
)
)
(if (= #CreateDiskChoice 1)
(@CreateDisk2)
)
(if (= #UserNovice 1)
(user 0)
)
(set @default-dest "")
)
)
(complete 90)
(set #InstallPrinter 1)
(if (< #UserNovice 1) ; Intermediate or Expert only
(
(set #InstallPrinter
(askbool
(prompt #PrinterChoicePrompt)
(choices #PrinterChoicemsg1 #PrinterChoicemsg2)
(help #PrinterChoice-help)
(default 0)
)
)
)
)
(if (= #InstallPrinter 1)
(
(@AddNewPrinter)
)
)
(@CleanUp)
(complete 100)
(if (= #DestinationType "Hard")
(exit)
(exit #FloppyFinishedMsg)
)